package com.direct.service.impl;

import com.direct.dao.DeptDao;
import com.direct.pojo.Dept;
import com.direct.service.DeptClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author caixiaofeng
 * @company xxx公司科技有限公司
 * @create 2020-04-21 15:02
 */
@Service
public class DeptServiceImpl implements DeptClientService {
    @Autowired
    private DeptDao deptDao;

    @Override
    public void addDept(Dept dept) {
        deptDao.addDept(dept);
    }

    @Override
    public Dept queryById(Long deptno) {
        Dept dept = deptDao.queryById(deptno);
        return dept;
    }

    @Override
    public List<Dept> queryAll() {
        List<Dept> deptList = deptDao.queryAll();
        return deptList;
    }
}
